<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en"
      xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.ViewContactTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: #d20005" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputText value="#{bundle.ViewContactLabel_id}"/>
                    <h:outputText value="#{contactController.selected.id}" title="#{bundle.ViewContactTitle_id}"/>
                    <h:outputText value="#{bundle.ViewContactLabel_firstName}"/>
                    <h:outputText value="#{contactController.selected.firstName}" title="#{bundle.ViewContactTitle_firstName}"/>
                    <h:outputText value="#{bundle.ViewContactLabel_lastName}"/>
                    <h:outputText value="#{contactController.selected.lastName}" title="#{bundle.ViewContactTitle_lastName}"/>
                    <h:outputText value="#{bundle.ViewContactLabel_birthday}"/>
                    <h:outputText value="#{contactController.selected.birthday}" title="#{bundle.ViewContactTitle_birthday}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:outputText>
                    <h:outputText value="#{bundle.ViewContactLabel_homePhone}"/>
                    <h:outputText value="#{contactController.selected.homePhone}" title="#{bundle.ViewContactTitle_homePhone}"/>
                    <h:outputText value="#{bundle.ViewContactLabel_mobilePhone}"/>
                    <h:outputText value="#{contactController.selected.mobilePhone}" title="#{bundle.ViewContactTitle_mobilePhone}"/>
                    <h:outputText value="#{bundle.ViewContactLabel_email}"/>
                    <h:outputText value="#{contactController.selected.email}" title="#{bundle.ViewContactTitle_email}"/>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{contactController.destroyAndView}" value="#{bundle.ViewContactDestroyLink}"/>
                <br />
                <br />
                <h:commandLink action="Edit" value="#{bundle.ViewContactEditLink}"/>
                <br />
                <h:commandLink action="#{contactController.prepareCreate}" value="#{bundle.ViewContactCreateLink}" />
                <br />
                <h:commandLink action="#{contactController.prepareList}" value="#{bundle.ViewContactShowAllLink}"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.ViewContactIndexLink}" action="/index" immediate="true" />

            </h:form>
        </ui:define>
    </ui:composition>

</html>
